import stun
import sys
import tools

import argparse

parser = argparse.ArgumentParser(
    formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument(
    '-d', '--debug', action='store_true',
    help='Enable debug logging'
)

parser.add_argument(
    '-i', '--source-ip',
    default="123123",
    help='network interface for client'
)

parser = argparse.ArgumentParser()

if __name__ == '__main__':
    # if sys.argv.__len__() == 1:
    #     # 房间名
    #     port = 54312
    #     print(f'未指定 port, 将默认设置为{port}!')
    # else:
    #     port = int(sys.argv[1])
    
    
    
    #sys.argv.append("-i")
    #sys.argv.append("332211")
    
    # args, unknow = parser.parse_known_args()
    
    args = parser.parse_args()
    
    print('123321')
    
    print('args ~~~~~~~~~~~~~ ', args)

    
    print("sys.argv --- ", sys.argv)
    
    
    
    # print(1)
    # xx_bt = b'{"a":"123"}'
    # # xx_str = str(xx_bt)
    # xx_str = xx_bt.decode('utf-8')
    # # print(xx_str)
    # new_ip = tools.get_a_not_in_use_port()
    # print(f'new_ip --- {new_ip}')

    # import json
    # # json.loads(str(xx_bt))
    # 123
    # 321
    # if 1:
    #     print(1)

    #     {
    #         'a': {"b": 1}
    #     }
    #     2
    # xx_dc = json.loads(xx_bt)
    # print('1111111 hello world')
    # print(xx_dc)

    # print('22222222232322')
    # print('33333333333')

    # json.dumps(xx_dc)
    # xx_js = json.dumps(xx_str)
    # print(xx_js)
    # print('~~~~~~~~ end')
    # json.loads(xx_js)
    pass




